import Vue from "vue";
import VueRouter from "vue-router";

// 引入组件
import card from "@/components/card1";
import sun from "@/components/sun";
import char from "@/components/char";
import distance from "@/components/distance";
import color from "@/components/color/color";
import cluster from "@/components/cluster/cluster";
import axis from "@/components/axis/axis";
import four_operation from "@/components/four_operation/main";
import sudo from "@/components/sudo/main";
import audio from "@/components/audio";
import audioDetail from "@/components/audioDetail";
import matrix from "@/components/matrix";
import permute1 from "@/components/permute1";
import sum_diff from "@/components/sum_diff";
import oral from "@/components/oral";
import mul from "@/components/mul";
import ruler from "@/components/ruler";
import decimal from "@/components/decimal";
import englishPage from "@/components/english/main";
import yunchouxue from "@/components/yunchouxue/main";
import graph from "@/components/graph/graph";
import name_check from "@/components/name_check/main";
import era from "@/components/era/main";
import xss from "@/components/xss/main";
import box from "@/components/box/main";
import fenshu from "@/components/fenshu/main";

// 要告诉 vue 使用 vueRouter
Vue.use(VueRouter);

const routes = [
    {
        path:"/card",
        component: card
    },
    {
        path: "/sun",
        component: sun
    },
    {
        path: "/char",
        component: char
    },
    {
        path: "/distance",
        component: distance
    },
    {
        path: "/color",
        component: color
    },
    {
        path: "/cluster",
        component: cluster
    },
    {
        path: "/audio",
        component: audio
    },
    {
        path: "/audioDetail",
        component: audioDetail
    },
    {
        path: "/matrix",
        component: matrix
    },
    {
        path: "/permute1",
        component: permute1
    },
    {
        path: "/sum_diff",
        component: sum_diff
    },
    {
        path: "/oral",
        component: oral
    },
    {
        path: "/mul",
        component: mul
    },
    {
        path: "/ruler",
        component: ruler
    },
    {
        path: "/decimal",
        component: decimal
    },
    {
        path: "/englishPage",
        component: englishPage
    },
    {
        path: "/graph",
        component: graph
    },
    {
        path: "/yunchouxue",
        component: yunchouxue
    },
    {
        path: "/name_check",
        component: name_check
    },
    {
        path: "/era",
        component: era
    },
    {
        path: "/xss",
        component: xss
    },
    {
        path: "/axis",
        component: axis
    },
    {
        path: "/four_operation",
        component: four_operation
    },
    {
        path: "/sudo",
        component: sudo
    },
    {
        path: "/box",
        component: box
    },
    {
        path: "/fenshu",
        component: fenshu
    }
]

let router =  new VueRouter({
    mode: 'history',
    routes
})
export default router;
